Change show_help signal to return gboolean instead of void. This allows
authorPadraig O'Briain <padraigo@src.gnome.org>
Thu, 7 Feb 2002 15:45:17 +0000 (15:45 +0000)
committerPadraig O'Briain <padraigo@src.gnome.org>
Thu, 7 Feb 2002 15:45:17 +0000 (15:45 +0000)
* gtk/gtkwidget.[ch]:
Change show_help signal to return gboolean instead of void. This
allows the keypress which invokes the signal to be propagated to the
focus widgets ancestors if not handled by the focus widget.

* gtk/gtktoolips.[ch]
Change _gtk_tooltips_show_tip () to return a gboolean indicating
whether widget has tooltip to display.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktooltips.c
gtk/gtktooltips.h
gtk/gtkwidget.c
gtk/gtkwidget.h

index ab6759871eb8085eeec3767b210330be43f8af80..ebc5f529f625d897b425417e75a112fd2f3f8076 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+       * gtk/gtkwidget.[ch]:
+       Change show_help signal to return gboolean instead of void. This
+       allows the keypress which invokes the signal to be propagated to the
+       focus widgets ancestors if not handled by the focus widget.
+       
+       * gtk/gtktoolips.[ch]
+       Change _gtk_tooltips_show_tip () to return a gboolean indicating
+       whether widget has tooltip to display.
+       
 2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtkwidget.[ch]:
index ab6759871eb8085eeec3767b210330be43f8af80..ebc5f529f625d897b425417e75a112fd2f3f8076 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+       * gtk/gtkwidget.[ch]:
+       Change show_help signal to return gboolean instead of void. This
+       allows the keypress which invokes the signal to be propagated to the
+       focus widgets ancestors if not handled by the focus widget.
+       
+       * gtk/gtktoolips.[ch]
+       Change _gtk_tooltips_show_tip () to return a gboolean indicating
+       whether widget has tooltip to display.
+       
 2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtkwidget.[ch]:
index ab6759871eb8085eeec3767b210330be43f8af80..ebc5f529f625d897b425417e75a112fd2f3f8076 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+       * gtk/gtkwidget.[ch]:
+       Change show_help signal to return gboolean instead of void. This
+       allows the keypress which invokes the signal to be propagated to the
+       focus widgets ancestors if not handled by the focus widget.
+       
+       * gtk/gtktoolips.[ch]
+       Change _gtk_tooltips_show_tip () to return a gboolean indicating
+       whether widget has tooltip to display.
+       
 2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtkwidget.[ch]:
index ab6759871eb8085eeec3767b210330be43f8af80..ebc5f529f625d897b425417e75a112fd2f3f8076 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+       * gtk/gtkwidget.[ch]:
+       Change show_help signal to return gboolean instead of void. This
+       allows the keypress which invokes the signal to be propagated to the
+       focus widgets ancestors if not handled by the focus widget.
+       
+       * gtk/gtktoolips.[ch]
+       Change _gtk_tooltips_show_tip () to return a gboolean indicating
+       whether widget has tooltip to display.
+       
 2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtkwidget.[ch]:
index ab6759871eb8085eeec3767b210330be43f8af80..ebc5f529f625d897b425417e75a112fd2f3f8076 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+       * gtk/gtkwidget.[ch]:
+       Change show_help signal to return gboolean instead of void. This
+       allows the keypress which invokes the signal to be propagated to the
+       focus widgets ancestors if not handled by the focus widget.
+       
+       * gtk/gtktoolips.[ch]
+       Change _gtk_tooltips_show_tip () to return a gboolean indicating
+       whether widget has tooltip to display.
+       
 2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtkwidget.[ch]:
index ab6759871eb8085eeec3767b210330be43f8af80..ebc5f529f625d897b425417e75a112fd2f3f8076 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+       * gtk/gtkwidget.[ch]:
+       Change show_help signal to return gboolean instead of void. This
+       allows the keypress which invokes the signal to be propagated to the
+       focus widgets ancestors if not handled by the focus widget.
+       
+       * gtk/gtktoolips.[ch]
+       Change _gtk_tooltips_show_tip () to return a gboolean indicating
+       whether widget has tooltip to display.
+       
 2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtkwidget.[ch]:
index ab6759871eb8085eeec3767b210330be43f8af80..ebc5f529f625d897b425417e75a112fd2f3f8076 100644 (file)
@@ -1,3 +1,14 @@
+2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
+
+       * gtk/gtkwidget.[ch]:
+       Change show_help signal to return gboolean instead of void. This
+       allows the keypress which invokes the signal to be propagated to the
+       focus widgets ancestors if not handled by the focus widget.
+       
+       * gtk/gtktoolips.[ch]
+       Change _gtk_tooltips_show_tip () to return a gboolean indicating
+       whether widget has tooltip to display.
+       
 2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
 
        * gtk/gtkwidget.[ch]:
index 6f035292cbf18aff0945f5d08684abd045f99e24..125a60732768db5b23e26f509d8161e692fdb2e9 100644 (file)
@@ -537,7 +537,7 @@ gtk_tooltips_widget_remove (GtkWidget *widget,
   gtk_tooltips_destroy_data (tooltipsdata);
 }
 
-void
+gboolean
 _gtk_tooltips_show_tip (GtkWidget *widget)
 {
   /* Showing the tip from the keyboard */
@@ -551,10 +551,11 @@ _gtk_tooltips_show_tip (GtkWidget *widget)
   tooltipsdata = gtk_tooltips_data_get (widget);
 
   if (tooltipsdata == NULL)
-    return;
+    return FALSE;
 
   gtk_tooltips_set_active_widget (tooltipsdata->tooltips,
                                   widget);
 
   gtk_tooltips_timeout (tooltipsdata->tooltips);
+  return TRUE;
 }
index 825e9635a2cc0c34b7b4503f9087088b5bb64125..d1e68b0ea5155e400b7cdc1a54ba563ef4a8e700 100644 (file)
@@ -94,7 +94,7 @@ GtkTooltipsData* gtk_tooltips_data_get           (GtkWidget     *widget);
 void             gtk_tooltips_force_window (GtkTooltips   *tooltips);
 
 
-void             _gtk_tooltips_show_tip    (GtkWidget    *widget);
+gboolean         _gtk_tooltips_show_tip    (GtkWidget    *widget);
 
 #ifdef __cplusplus
 }
index 2908ecf03cc4acd7705f181e057024eecdef1a68..74a020020dc878baa91337cdb98f34c5be5f1e1d 100644 (file)
@@ -179,7 +179,7 @@ static void gtk_widget_direction_changed     (GtkWidget         *widget,
                                                  GtkTextDirection   previous_direction);
 
 static void    gtk_widget_real_grab_focus       (GtkWidget         *focus_widget);
-static void     gtk_widget_real_show_help        (GtkWidget         *widget,
+static gboolean gtk_widget_real_show_help        (GtkWidget         *widget,
                                                   GtkWidgetHelpType  help_type);
 
 static void    gtk_widget_dispatch_child_properties_changed    (GtkWidget        *object,
@@ -1010,12 +1010,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                   _gtk_marshal_BOOLEAN__VOID,
                  G_TYPE_BOOLEAN, 0);
   widget_signals[SHOW_HELP] =
-    gtk_signal_new ("show_help",
-                   GTK_RUN_LAST | GTK_RUN_ACTION,
-                   GTK_CLASS_TYPE (object_class),
-                   GTK_SIGNAL_OFFSET (GtkWidgetClass, show_help),
-                    _gtk_marshal_NONE__ENUM,
-                   GTK_TYPE_NONE, 1, GTK_TYPE_WIDGET_HELP_TYPE);
+    g_signal_new ("show_help",
+                 G_TYPE_FROM_CLASS (object_class),
+                 G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+                 GTK_SIGNAL_OFFSET (GtkWidgetClass, show_help),
+                 _gtk_boolean_handled_accumulator, NULL,
+                  _gtk_marshal_BOOLEAN__ENUM,
+                 G_TYPE_BOOLEAN, 1, GTK_TYPE_WIDGET_HELP_TYPE);
   widget_signals[ACCEL_CLOSURES_CHANGED] =
     gtk_signal_new ("accel_closures_changed",
                    0,
@@ -3394,12 +3395,14 @@ gtk_widget_real_grab_focus (GtkWidget *focus_widget)
     }
 }
 
-static void
+static gboolean
 gtk_widget_real_show_help (GtkWidget        *widget,
                            GtkWidgetHelpType help_type)
 {
   if (help_type == GTK_WIDGET_HELP_TOOLTIP)
-    _gtk_tooltips_show_tip (widget);
+     return _gtk_tooltips_show_tip (widget);
+  else
+     return FALSE;
 }
 
 static gboolean
index 6eebb124f0394b584cee3b6fb689b5531960fc3e..607aa7929319b55e76755f836177816b869330a2 100644 (file)
@@ -394,7 +394,7 @@ struct _GtkWidgetClass
    * sense, should cycle through them showing each tip alongside
    * whatever piece of the widget it applies to.
    */
-  void (* show_help)               (GtkWidget          *widget,
+  gboolean (* show_help)           (GtkWidget          *widget,
                                     GtkWidgetHelpType   help_type);
   
   /* accessibility support